<extend name="Base/ucenter_common"/>
<block name="body">

    <div class="widget-box">
        <form class="form form-inline">
            <div class="form-group">
                <label for="" class="control-label">搜索赛事：</label>
                <input type="text" class="form-control" name="all_name" value="{$search.all_name}" placeholder="输入赛事名称">
            </div>
            <div class="form-group">
                <button type="submit" class="btn btn-primary">搜索</button>
            </div>
        </form>
    </div>
    <div class="widget-box">
        <div class="widget-header">
            <h3>{$_seo_data.title}
                <small><span style="color: #000">白色</span>:未到时间</small>
                <small><span style="color: red;;">红色</span>:已经过时</small>
                <small><span style="color: green;;">绿色</span>:可以报名</small>
            </h3>
        </div>
        <div class="widget-body">
            <table class="table table-bordered table-hover">
                <thead>
                <tr>
                    <th>ID</th>
                    <th>赛事名称</th>
                    <th>竞赛日期</th>
                    <th>报名开始日期</th>
                    <th>报名截止时间</th>
                    <th>报名操作</th>
                </tr>
                </thead>
                <tbody>
                <volist name="_list" id="vo">
                    <php>
                        $gameStatus=0;
                        $tmpClass="";
                        $dateNow=date('Y-m-d H:i:s');
                        if($vo['all_b_time']>$dateNow){
                        $gameStatus=2;
                        $tmpClass="default";
                        }else if($vo['all_e_time']<$dateNow){
                        $gameStatus=3;
                        $tmpClass="danger";
                        }else{
                        $gameStatus=1;
                        $tmpClass="success";
                        }

                    </php>
                    <tr class="{$tmpClass}">
                        <td>{$vo.all_id}</td>
                        <td>{$vo.all_name}</td>
                        <td>{$vo.all_start}</td>
                        <td>{$vo.all_b_time}</td>
                        <td>{$vo.all_e_time}</td>
                        <td><a href="{:U('manage/pro_detail',array('id'=>$vo['all_id']))}">进入</a></td>
                    </tr>
                </volist>
                </tbody>
            </table>
        </div>
    </div>
</block>